 
 <#-- 
 
 creates a sentence for create a table in sql server...
 
 
 -->
<#-- variables used internally by the generator... -->
<#assign nameFile="sql">
<#assign extensionFile="sql">
<#assign languageGenerated="sql">
<#assign description="sql">
<#assign targetDirectory="sql">
<#assign appliesToAllTables="true">
<#-- END variables used internally by the generator... -->


 


 
 
#
# Table structure for table '${table}'
#


CREATE TABLE "${table}" (
 
	<#list table.getFields() as field>
	 
		 <#-- segun el tipo de campo...   -->
		 <#switch field.getType()>
			  <#case "_int">
			     "${field}" int(${field.getSize()}) unsigned NOT NULL 
				 
				<#break>
			  <#case "_string">
			     "${field}" varchar(${field.getSize()}) NOT NULL default '',
			     <#break>
			  <#case "_date">
			     "${field}" datetime NOT NULL default '0000-00-00 00:00:00',
			     <#break>
			  <<#case "_boolean">
			     "${field}" tinyint(1) NOT NULL default '0',
			     <#break>
			  <#default>
			     "${field}" varchar(${field.getSize()}) NOT NULL default '',
		</#switch>  
	</#list>		
	PRIMARY KEY  (${table.getListOnlyKeyFields()}),
	 
);


 


